package com.shaobufan.museum.controllar;

import com.shaobufan.museum.common.BaseResponse;
import com.shaobufan.museum.common.ResultUtils;
import com.shaobufan.museum.pojo.vo.CollectionsVo;
import com.shaobufan.museum.service.CollectionsExhibitService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/CollectionsExhibit")
public class CollectionsExhibitController {
    @Resource
    CollectionsExhibitService collectionsExhibitService;

    @ApiOperation("根据id获取展览藏品")
    @GetMapping("/get/{params}")
    public BaseResponse<List<CollectionsVo>> getCollectionsExhibitById(@PathVariable Integer params) {
        List<CollectionsVo> collectionsVoList = collectionsExhibitService.searchCollectionsExhibit(params);
        return ResultUtils.success(collectionsVoList, "根据id获取展览藏品");
    }
}
